home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
cenvid
/
dosver.bat
< prev
next >
Wrap
DOS Batch File
|
1995-04-07
|
851b
|
35 lines
@echo off
REM ********************************************************************
REM *** DosVer - Get DOS Version Number ***
REM *** wanted to test how to use BIOS interrupts with CEnvi ***
REM Jouni Miettunen * jon@stekt.oulu.fi * Oulu * Finland * Europe * 1993
REM ********************************************************************
@CEnviD %0.bat %1
GOTO CENVI_EXIT
main(argc,argv)
{
if ( argc != 1 )
Instructions();
else
get_dos_version()
}
get_dos_version()
{
regs.ah = 0x30;
interrupt(0x21,regs); // get version number
if (regs.al==0) puts("DOS earlier that 2.0\n");
else printf("DOS %d.%d\n",regs.al,regs.ah);
}
Instructions()
{
puts("");
puts("dosver - Show DOS version");
puts("");
puts("Usage: dosver");
}
:CENVI_EXIT